package com.sitech.ibnms.c3p.mappers;

import com.sitech.ibnms.c3p.domain.C3pNotice;
import com.sitech.ibnms.c3p.task.TaskStatus;
import org.apache.ibatis.annotations.Param;
import org.springframework.cache.annotation.Cacheable;

import java.util.List;

/**
 * Created by liujhc on 11/4.
 */
public interface C3pNoticeMapper {
    @Cacheable("instant")
    List<C3pNotice> findByC3pTaskIdAndStatus(@Param("c3pTaskId") String c3pTaskId, @Param("status") TaskStatus status);

    @Cacheable("longTerm")
    String selectEmailByUserId(@Param("loginId") String loginId);

    List<String> selectNoticeById(@Param("noticeId") String noticeId, @Param("type") String type);

    @Cacheable("longTerm")
    List<C3pNotice> selectById(@Param("noticeId") String noticeId);

    /**
     * 根据任务taskId查找需要发往的地址信息
     * @param taskId
     * @param type
     * @return
     */
    List<String> selectNoticeByTaskId(@Param("taskId") String taskId,@Param("type") String type);
}
